package com.burst.reptile.modular.zp.entity;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 地区列表
 * </p>
 *
 * @author wujin
 * @since 2020-06-18
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("zp_city")
public class ZpCity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 地区代码
     */ 
    @TableId(value = "aid", type = IdType.INPUT)
    @NotBlank(message = "地区代码不能为空")
	@Size(min = 0, max = 50, message = "地区代码长度不能超过50个字符")
    private String aid;

    /**
     * 父id
     */
    private String parentId;

    /**
     * 祖级列表
     */
    private String ancestors;
    
    /**
     * 层级级别
     */
    @Size(min = 0, max = 1, message = "层级级别长度不能超过1个字符")
    private String levelType;

    /**
     * 名称
     */
    @NotBlank(message = "站点名称不能为空")
	@Size(min = 0, max = 50, message = "站点名称长度不能超过50个字符")
    private String name;
    
    /**
     * 简称
     */
   	@Size(min = 0, max = 50, message = "简称长度不能超过50个字符")
    private String shortName;
    
    /**
     * 拼音
     */
   	@Size(min = 0, max = 50, message = "拼音长度不能超过50个字符")
    private String pinyin;
    
    /**
     * 简拼
     */
   	@Size(min = 0, max = 50, message = "简拼长度不能超过50个字符")
    private String jianpin;
    
    /**
     * 首拼
     */
   	@Size(min = 0, max = 1, message = "首拼长度不能超过1个字符")
    private String firstChar;
    
    /**
     * 禁用 0：未禁用 1：已禁用
     */
	@Size(min = 0, max = 1, message = "非法请求")
    private String disabled;

    /**
     * 子类
     */
    @TableField(exist = false)
    private List<ZpCity> children = new ArrayList<>();

}
